package com.woniuxy.form;

import lombok.Data;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;
@Data
public class OrderForm {



    /**
     * 用户id
     */
    @NotBlank
    private Integer userId;

    /**
     * 酒店ID
     */
    @NotBlank
    private Integer hotelId;

    /**
     * 房间门牌号
     */
    @NotBlank
    private Integer roomId;



    /**
     * 初始下单账单金额
     */
    @Pattern(regexp = "/^[1-9]{1}\\d*(.\\d{1,2})?$|^0.\\d{1,2}$/")
    private Double initialAmount;

    /**
     * 优惠券id
     */
    @NotBlank
    private Integer couponId;

    /**
     * 实际最终下单金额
     */
    @Pattern(regexp = "/^[1-9]{1}\\d*(.\\d{1,2})?$|^0.\\d{1,2}$/")
    private Double actualAmount;


    /**
     * 入住起始日期
     */
    @NotBlank
    private LocalDateTime timeOfStart;

    /**
     * 入住终止日期
     */
    @Future
    private LocalDateTime timeOfEnd;
}
